From 9127eafd3d01138bd8d72c642f3290a131aed4a9 Mon Sep 17 00:00:00 2001 From: "br260@labyrinth.cl.cam.ac.uk" Date: Mon, 9 Feb 2004 18:18:12 +0000 Subject: [PATCH] bitkeeper revision 1.713.1.1 (4027cee4DwiREGMFe_AVrFnHsCg2Ug) Add comment. --- BitKeeper/etc/ignore | 1 + tools/xc/lib/xc_netbsd_build.c | 10 ++++++---- xen/include/hypervisor-ifs/hypervisor-if.h | 8 ++++---- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/BitKeeper/etc/ignore b/BitKeeper/etc/ignore index 3374b47fa9..f6915983db 100644 --- a/BitKeeper/etc/ignore +++ b/BitKeeper/etc/ignore @@ -538,3 +538,4 @@ xen/arch/i386/flushtlb.o xen/common/rbtree.o xen/drivers/block/cciss.o xen/drivers/block/cciss_scsi.o +TAGS diff --git a/tools/xc/lib/xc_netbsd_build.c b/tools/xc/lib/xc_netbsd_build.c index adf7c6774a..5736ca5826 100644 --- a/tools/xc/lib/xc_netbsd_build.c +++ b/tools/xc/lib/xc_netbsd_build.c @@ -503,7 +503,7 @@ loadelfimage(gzFile kernel_gfd, int pm_handle, unsigned long *page_array, } curpos += ehdr.e_phnum * sizeof(Elf_Phdr); - + /* Copy kernel .text .data .bss segments into physical memory */ for (h = 0; h < ehdr.e_phnum; h++) { if (phdr[h].p_type != PT_LOAD || (phdr[h].p_flags & (PF_W|PF_X)) == 0) @@ -585,6 +585,7 @@ loadelfimage(gzFile kernel_gfd, int pm_handle, unsigned long *page_array, maxva += sizeof(Elf_Ehdr) + ehdr.e_shnum * sizeof(Elf_Shdr); maxva = (maxva + ELFROUND - 1) & ~(ELFROUND - 1); + /* Copy kernel string / symbol tables into physical memory */ for (h = 0; h < ehdr.e_shnum; h++) { if (shdr[h].sh_type == SHT_STRTAB) { for (i = 0; i < ehdr.e_shnum; i++) @@ -593,7 +594,7 @@ loadelfimage(gzFile kernel_gfd, int pm_handle, unsigned long *page_array, break; if (i == ehdr.e_shnum) { shdr[h].sh_offset = 0; - continue; + continue; /* Skip string tables which are not for symbol tables */ } } @@ -606,7 +607,7 @@ loadelfimage(gzFile kernel_gfd, int pm_handle, unsigned long *page_array, } curpos = shdr[h].sh_offset; - shdr[h].sh_offset = maxva - *symtab_addr; + shdr[h].sh_offset = maxva - *symtab_addr; /* Mangled to be based on ELF header location */ DPRINTF(("copy section %d, size 0x%x\n", h, shdr[h].sh_size)); for (i = 0; i < shdr[h].sh_size; i += c, maxva += c) { @@ -635,7 +636,7 @@ loadelfimage(gzFile kernel_gfd, int pm_handle, unsigned long *page_array, maxva = (maxva + ELFROUND - 1) & ~(ELFROUND - 1); } - shdr[h].sh_name = 0; + shdr[h].sh_name = 0; /* Name is NULL */ } if (*symtab_len == 0) { @@ -656,6 +657,7 @@ loadelfimage(gzFile kernel_gfd, int pm_handle, unsigned long *page_array, memcpy(p + sizeof(int), &ehdr, sizeof(Elf_Ehdr)); *(int *)p = maxva - *symtab_addr; + /* Copy total length, crafted ELF header and section header table */ s = sizeof(int) + sizeof(Elf_Ehdr) + ehdr.e_shnum * sizeof(Elf_Shdr); for (i = 0; i < s; i += c, symva += c) { c = PAGE_SIZE - (symva & (PAGE_SIZE - 1)); diff --git a/xen/include/hypervisor-ifs/hypervisor-if.h b/xen/include/hypervisor-ifs/hypervisor-if.h index ac1ecfd6f8..4233d56285 100644 --- a/xen/include/hypervisor-ifs/hypervisor-if.h +++ b/xen/include/hypervisor-ifs/hypervisor-if.h @@ -29,10 +29,10 @@ * are also present in the initial GDT, many OSes will be able to avoid * installing their own GDT. */ -#define FLAT_RING1_CS 0x0819 -#define FLAT_RING1_DS 0x0821 -#define FLAT_RING3_CS 0x082b -#define FLAT_RING3_DS 0x0833 +#define FLAT_RING1_CS 0x0819 /* GDT index 259 */ +#define FLAT_RING1_DS 0x0821 /* GDT index 260 */ +#define FLAT_RING3_CS 0x082b /* GDT index 261 */ +#define FLAT_RING3_DS 0x0833 /* GDT index 262 */ /* -- 2.30.2